﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;

namespace VisualExamEngine
{
    class clsQuestion
    {
        /// <summary>
        /// The parent exam
        /// </summary>
        clsExam ParentExam;

        public clsQuestion(clsExam Parent)
        {
            ParentExam = Parent;
        }

        /// <summary>
        /// The currently selected question
        /// </summary>
        public int SelectedSection = 0;

        [DescriptionAttribute("The section the question belongs to.")]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
        [TypeConverter(typeof(clsDropDownTypeConverter))]
        [DisplayName("Section")]
        public String SelectedSectionText { get; set; }

        [DescriptionAttribute("The type of question: multiple choice etc...")]
        public String Type { get; set; }

        [Browsable(false)]
        public List<String> Section
        {
            get
            {
                return ParentExam.Sections;
            }  
        }

        [DescriptionAttribute("The exam number...")]
        public int Number { get; set; }

        public clsQuestion()
        {

        }
    }
}
